Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pex --docs and several pex3 docs options. #2365

Merged
merged 5 commits into from
Feb 15, 2024

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Feb 15, 2024

The pex --docs shortcut should provide an ergonomic way to open the
local docs for most Pex CLI users (undoubtedly few use pex3). The
pex3 docs additional options allow for most of the control needed
though, and the help for the pex --docs option points there.

The `pex --docs` shortcut should provide an ergonomic way to open the
local docs for most Pex CLI users (undoubtedly few use `pex3`). The
`pex3 docs` additional options allow for most of the control needed
though, and the help for the `pex --docs` option points there.
Copy link
Collaborator

@zmanji zmanji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure on the whole server/pidfile logic but everything lgtm.

@jsirois
Copy link
Member Author

jsirois commented Feb 15, 2024

Thanks for taking a look @zmanji.

I am not sure on the whole server/pidfile logic but everything lgtm.

That is just moved code in this PR (so pex --docs could share the pex3 docs infra), and its still ~copied code from testing.devpi which powers the --devpi option for the tests and integration tests. Both CI and I have been hammering that logic for a while now; so it may be buggy, but it appears to be solid. The bugs likely lie in rare corner cases.

STANDARD_PORT = 45585


def serve_html_docs(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function was pretty much a pure extraction from the run method of pex.cli.commands.docs.Docs so that pex --docs could share the infra.



@attr.s(frozen=True)
class Pidfile(object):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was pretty much a pure extraction from pex.cli.commands.docs so that pex --docs could share the infra.

This needs to be extracted out to the doc site, but best to get it clear
here now.
@jsirois jsirois merged commit c783c64 into pex-tool:main Feb 15, 2024
26 checks passed
@jsirois jsirois deleted the docs/cli/flesh-out branch February 15, 2024 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants